import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
@WebServlet("/servletControllSearch")
public class servletControllSearch {
    private static final long serialVersionUID = 1L;
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.getRequestDispatcher("success.jsp").forward(request, response);
    }
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String label = request.getParameter("label");

        Search search = new Search(label);
        SearchDao searchDao = new SearchDao();

        searchDao.SearchUser(search);

//        request.getSession().setAttribute("user", user);
//        response.sendRedirect("success.jsp");
    }
}
